class Dog:
    def __init__(self, name, breed, color):
        self.name = name
        self.breed = breed
        self.color = color

    def bark(self):
        print(self.name + " says woof!")


# 创建一只狗对象
my_dog = Dog("Buddy", "Golden Retriever", "golden")

# 访问对象的属性
print("My dog's name is " + my_dog.name)
print("My dog's breed is " + my_dog.breed)
print("My dog's color is " + my_dog.color)

# 调用对象的方法
my_dog.bark()
